home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / libol / command.h.x < prev    next >
Text File  |  2005-10-16  |  4KB  |  176 lines

  1. #ifndef CLASS_DEFINE
  2. struct command_continuation
  3. {
  4.   struct ol_object super;
  5.   int (*(c))(struct command_continuation *self, struct ol_object *result);
  6. };
  7. extern struct ol_class command_continuation_class;
  8. #endif /* !CLASS_DEFINE */
  9.  
  10. #ifndef CLASS_DECLARE
  11. struct ol_class command_continuation_class =
  12. { STATIC_HEADER,
  13.   0, "command_continuation", sizeof(struct command_continuation),
  14.   NULL,
  15.   NULL
  16. };
  17. #endif /* !CLASS_DECLARE */
  18.  
  19. #ifndef CLASS_DEFINE
  20. struct command
  21. {
  22.   struct ol_object super;
  23.   int (*(call))(struct command *self, struct ol_object *arg, struct command_continuation *c);
  24. };
  25. extern struct ol_class command_class;
  26. #endif /* !CLASS_DEFINE */
  27.  
  28. #ifndef CLASS_DECLARE
  29. struct ol_class command_class =
  30. { STATIC_HEADER,
  31.   0, "command", sizeof(struct command),
  32.   NULL,
  33.   NULL
  34. };
  35. #endif /* !CLASS_DECLARE */
  36.  
  37. #ifndef CLASS_DEFINE
  38. struct command_simple
  39. {
  40.   struct command super;
  41.   struct ol_object * (*(call_simple))(struct command_simple *self, struct ol_object *);
  42. };
  43. extern struct ol_class command_simple_class;
  44. #endif /* !CLASS_DEFINE */
  45.  
  46. #ifndef CLASS_DECLARE
  47. struct ol_class command_simple_class =
  48. { STATIC_HEADER,
  49.   &command_class, "command_simple", sizeof(struct command_simple),
  50.   NULL,
  51.   NULL
  52. };
  53. #endif /* !CLASS_DECLARE */
  54.  
  55. #ifndef CLASS_DEFINE
  56. struct command_frame
  57. {
  58.   struct command_continuation super;
  59.   struct command_continuation *up;
  60. };
  61. extern struct ol_class command_frame_class;
  62. #endif /* !CLASS_DEFINE */
  63.  
  64. #ifndef CLASS_DECLARE
  65. static void do_command_frame_mark(struct ol_object *o, 
  66. void (*mark)(struct ol_object *o))
  67. {
  68.   struct command_frame *i = (struct command_frame *) o;
  69.   mark((struct ol_object *) i->up);
  70. }
  71.  
  72. struct ol_class command_frame_class =
  73. { STATIC_HEADER,
  74.   &command_continuation_class, "command_frame", sizeof(struct command_frame),
  75.   do_command_frame_mark,
  76.   NULL
  77. };
  78. #endif /* !CLASS_DECLARE */
  79.  
  80. #ifndef CLASS_DEFINE
  81. struct collect_info_4
  82. {
  83.   struct ol_object super;
  84.   struct ol_object * (*(f))(struct collect_info_4 *self, struct ol_object *, struct ol_object *, struct ol_object *, struct ol_object *);
  85. };
  86. extern struct ol_class collect_info_4_class;
  87. #endif /* !CLASS_DEFINE */
  88.  
  89. #ifndef CLASS_DECLARE
  90. struct ol_class collect_info_4_class =
  91. { STATIC_HEADER,
  92.   0, "collect_info_4", sizeof(struct collect_info_4),
  93.   NULL,
  94.   NULL
  95. };
  96. #endif /* !CLASS_DECLARE */
  97.  
  98. #ifndef CLASS_DEFINE
  99. struct collect_info_3
  100. {
  101.   struct ol_object super;
  102.   struct ol_object * (*(f))(struct collect_info_3 *self, struct ol_object *, struct ol_object *, struct ol_object *);
  103.   struct collect_info_4 *next;
  104. };
  105. extern struct ol_class collect_info_3_class;
  106. #endif /* !CLASS_DEFINE */
  107.  
  108. #ifndef CLASS_DECLARE
  109. static void do_collect_info_3_mark(struct ol_object *o, 
  110. void (*mark)(struct ol_object *o))
  111. {
  112.   struct collect_info_3 *i = (struct collect_info_3 *) o;
  113.   mark((struct ol_object *) i->next);
  114. }
  115.  
  116. struct ol_class collect_info_3_class =
  117. { STATIC_HEADER,
  118.   0, "collect_info_3", sizeof(struct collect_info_3),
  119.   do_collect_info_3_mark,
  120.   NULL
  121. };
  122. #endif /* !CLASS_DECLARE */
  123.  
  124. #ifndef CLASS_DEFINE
  125. struct collect_info_2
  126. {
  127.   struct ol_object super;
  128.   struct ol_object * (*(f))(struct collect_info_2 *self, struct ol_object *, struct ol_object *);
  129.   struct collect_info_3 *next;
  130. };
  131. extern struct ol_class collect_info_2_class;
  132. #endif /* !CLASS_DEFINE */
  133.  
  134. #ifndef CLASS_DECLARE
  135. static void do_collect_info_2_mark(struct ol_object *o, 
  136. void (*mark)(struct ol_object *o))
  137. {
  138.   struct collect_info_2 *i = (struct collect_info_2 *) o;
  139.   mark((struct ol_object *) i->next);
  140. }
  141.  
  142. struct ol_class collect_info_2_class =
  143. { STATIC_HEADER,
  144.   0, "collect_info_2", sizeof(struct collect_info_2),
  145.   do_collect_info_2_mark,
  146.   NULL
  147. };
  148. #endif /* !CLASS_DECLARE */
  149.  
  150. #ifndef CLASS_DEFINE
  151. struct collect_info_1
  152. {
  153.   struct command_simple super;
  154.   struct ol_object * (*(f))(struct collect_info_1 *self, struct ol_object *);
  155.   struct collect_info_2 *next;
  156. };
  157. extern struct ol_class collect_info_1_class;
  158. #endif /* !CLASS_DEFINE */
  159.  
  160. #ifndef CLASS_DECLARE
  161. static void do_collect_info_1_mark(struct ol_object *o, 
  162. void (*mark)(struct ol_object *o))
  163. {
  164.   struct collect_info_1 *i = (struct collect_info_1 *) o;
  165.   mark((struct ol_object *) i->next);
  166. }
  167.  
  168. struct ol_class collect_info_1_class =
  169. { STATIC_HEADER,
  170.   &command_simple_class, "collect_info_1", sizeof(struct collect_info_1),
  171.   do_collect_info_1_mark,
  172.   NULL
  173. };
  174. #endif /* !CLASS_DECLARE */
  175.  
  176.